﻿Imports System.Web.Mvc
Imports ADODBU

Public Class ModuleController
    Inherits Web.Mvc.Controller 'Ext.Direct.Mvc.DirectController

    '<AcceptVerbs(HttpVerbs.Post)> _
    Public Function ExecProc(ByVal param As String) As ActionResult
        Dim mStrParam As String = RowClassUtil.GetASCIIStringFromBytes(Request.BinaryRead(Request.TotalBytes))
        If param <> Nothing Then
            mStrParam = param
        End If
        Return ProcessHelper.ProcessHelper.CreateProcess(mStrParam)
    End Function

    <AcceptVerbs(HttpVerbs.Post)> _
    Public Function ExecReport()

        Return ReportHelper.CreateReport(RowClassUtil.GetASCIIStringFromBytes(Request.BinaryRead(Request.TotalBytes)))

    End Function

    Public Function ViewModules(ByVal ctargetMdl As String) As ActionResult

        'Dim str As Byte()
        'Dim i As Integer
        Dim txt As String = ""
        txt = Request.Url.Query.Replace("?", "")

        Return View(New Models.ModuleExec(txt).ListJS)
    End Function

    Public Function ViewReport() As ActionResult


        Return View()
    End Function
End Class
